package com.itheima.config;

import com.itheima.interceptor.LoginCheckInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author wuJiaWei
 * @version 1.0
 */
@Configuration // 将当前类标记为配置类
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private LoginCheckInterceptor loginCheckInterceptor;
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginCheckInterceptor)// 添加拦截器
//                .addPathPatterns("/**")// 拦截所有请求
//                .excludePathPatterns("/login","/employee/login");// 放行登录请求
//    }
}
